// 市场观点数据类型
export interface MarketViewData {
  assetClass: string
  subAsset: string
  strategy: string
  cautious: boolean
  neutral: boolean
  optimistic: boolean
  marginalChange: 'up' | 'down' | 'stable'
  recommendedTarget: string
  code: string
}

// 图表数据类型
export interface ChartData {
  date: string
  value: number
}

export interface ChartSeries {
  name: string
  data: ChartData[]
  color?: string
}

// 流动性及利差数据类型
export interface LiquidityData {
  excessReserveRatio: ChartSeries
  dr007: ChartSeries
  governmentBond1Y: ChartSeries
  shibor6Y: ChartSeries
  lpr1Y: ChartSeries
}

export interface SpreadData {
  corporateBondAAvsAAA: ChartSeries
  corporateBondAAvsGov: ChartSeries
  urbanInvestmentAAvsAAA: ChartSeries
}

// 债市资金数据类型
export interface BondFundData {
  m2ToMarketRatio: ChartSeries
  cfetsIndices: ChartSeries[]
}

// 信贷周期数据类型
export interface CreditCycleData {
  interbankLiquidity: ChartSeries
  interbankLiquidityTrend: ChartSeries
  cycleIndicator: ChartSeries
  creditImpulse: ChartSeries
  creditChange: ChartSeries
}

// 货币信用周期数据类型
export interface CurrencyCreditData {
  looseMoneyLooseCredit: ChartSeries
  looseMoneyTightCredit: ChartSeries
  tightMoneyLooseCredit: ChartSeries
  tightMoneyTightCredit: ChartSeries
  credit: ChartSeries
  currency: ChartSeries
}

// 市场久期变化趋势数据类型
export interface DurationTrendData {
  shortTermBondFunds: ChartSeries
  mediumLongTermBondFunds: ChartSeries
}

// 页面整体数据类型
export interface FixedAssessmentData {
  marketView: MarketViewData[]
  liquidity: LiquidityData
  spreads: SpreadData
  bondFunds: BondFundData
  creditCycle: CreditCycleData
  currencyCredit: CurrencyCreditData
  durationTrend: DurationTrendData
}

// 图表配置类型
export interface ChartConfig {
  height: number
  showExtremes: boolean
  timeRange: {
    start: string
    end: string
  }
  frequency: 'all' | 'monthly' | 'weekly' | 'daily'
}

// 模拟数据生成配置
export interface MockDataConfig {
  startDate: string
  endDate: string
  dataPoints: number
}

// 图表通用配置
export interface EChartsOption {
  title?: any
  tooltip?: any
  legend?: any
  grid?: any
  xAxis?: any
  yAxis?: any
  series?: any[]
  dataZoom?: any[]
  [key: string]: any
}

// 时间范围选择器配置
export interface TimeRangeSelector {
  startDate: string
  endDate: string
  frequency: 'all' | 'monthly' | 'weekly' | 'daily'
  showExtremes: boolean
}
